#ifndef _MEMBER_BCOMBOBOX_H_
#define _MEMBER_BCOMBOBOX_H_

#include <ctime>
#include <BRect>
#include "ILineBlock.h"
#include "IComboBoard.h"

#define combox_member(combox)		((member_BComboBox*)((BComboBox*)combox)->_ptr)

namespace BWE
{
	class member_BComboBox : public ILineBlock
	{
	public:
		member_BComboBox(BComboBox* comboBox);
		~member_BComboBox();

		void freshRects();

		BComboBox*			boss;
		Align				align;
		Form				form;
		int					spacing;
		bool				readOnly;
		BSize				iconSize;
		BSize				realIconSize;
		BComboItem*			current;
		BValue				value;
		clock_t				blinkTick;
		int					blinkTime;
		bool				inputShown;

		bool				dirty;
		State				state;
		State				arrowState;
		BRect				iconRect;
		BRect				textRect;
		BSize				contentSize;

		bool				editing;
		bool				pressed;
		int					pressIndex;
		int					hoverIndex;
		BPoint				lineBegin;
		BPoint				lineEnd;

		BHolder<BButton>	arrow;
		BHolder<IComboBoard>	board;
		BArray<BComboItemHolder>	items;
	};
}

#endif